//
//  RZ_StatusTableViewCell.swift
//  Pods
//
//  Created by eme on 2017/7/26.
//
//

import UIKit
import BrandonCore

class RZ_StatusTableViewCell: UITableViewCell {

    @IBOutlet weak var StatusLabel: UILabel!
    
    @IBOutlet weak var statusLabelWithLeft: NSLayoutConstraint!
    
    @IBOutlet weak var statusImage: UIImageView!
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        if case AppDataState.auditing = AppData.appState{
            StatusLabel.text = "审核中"
            statusImage.isHidden = true
            self.contentView.backgroundColor = UIColor(hex:"E55D3B")
        }else if case AppDataState.auditfailed = AppData.appState{
            StatusLabel.text = "审核不通过"
            statusImage.isHidden = true
            self.contentView.backgroundColor = UIColor(hex:"E55D3B")
        }else if case AppDataState.audited = AppData.appState{
            StatusLabel.text = "已认证"
            statusImage.isHidden = false
            statusImage.image = UIImage.init(named: "rzStatusImage", in: SansaCore.bundle, compatibleWith: nil)
            statusLabelWithLeft.constant = 40
            self.contentView.backgroundColor = UIColor.white
            StatusLabel.textColor = UIColor.black
        }
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
